let token = getToken();
let user = JSON.parse(window.localStorage.getItem("userInfo"));
if (user) {
  var ret = playGet(`/v1/api/users/money/${user.id}`, "", "", token);
  if (ret.code == 200) {
    ret.data.forEach((m) => {
      let diff = parseFloat(m.after) - parseFloat(m.befor);
      if (m.type.display === "提现") {
        diff = (diff / 94) * 100;
      }
      let li = `<li><p><b class="yellow">${m.type.display}</b> <b class="yellow">${diff}</b></p><p><span class="time">${m.modifiedTime}</span></p></li>`;
      $("#dataList").append(li);
    });
  } else {
    mui.alert(ret.msg);
  }
  ret = playGet(`v1/api/users/ye/${user.id}`, "", "", token);
  if (ret.code == 200) {
    $("#totalMoney").html(ret.data.money);
    $("#djMoney").html(ret.data.frostMoney);
  } else {
    mui.alert(ret.msg);
  }
} else {
  mui.alert("您还未登录，请先登录");
}
